<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">
    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <title>SFT</title>
            </f:facet>
        </h:head>
        <h:form id="form">
            <p:layoutUnit position="center">
                <p:panel id="panelLogin" header="Login" style="width: 30%">  
                    <h:panelGrid id="grid" columns="3" style="margin-bottom:10px; width: 50%"> 
                        <f:facet name="header">  
                            <p:messages />  
                        </f:facet>
                        <h:outputLabel for="login" value="Login:" />
                        <p:inputText id="login" value="#{loginController.login}" required="true"/>
                        <br/><br/>
                        <h:outputLabel for="senha" value="Senha:" />  
                        <p:password id="senha" value="#{loginController.senha}" required="true"/>
                        <br/><br/><br/>
                        <p:commandButton value="Entrar" actionListener="#{loginController.buscarFuncionario}" update="panelLogin" ajax="false"/>
                    </h:panelGrid>

                    <p:dialog id="dialog" header="#{loginController.tituloMsg}" widgetVar="loginDialog" resizable="false"  
                              showEffect="fade" hideEffect="explode">  
                        <h:panelGrid id="display" columns="2" cellpadding="4"> 
                            <h:outputText value="#{loginController.msg}" />  
                        </h:panelGrid>  
                    </p:dialog>
                </p:panel>
            </p:layoutUnit>
        </h:form>  
    </f:view>
</ui:composition>
